package de.hft.st.algodat.ctt.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ConstraintRoom extends Constraint {

	private final constraintType cType = Constraint.constraintType.ROOM;
	private List<String> rooms = new ArrayList<String>();
	
	protected ConstraintRoom(String course, List<String> rooms) {
		this.course = course;
		this.rooms = rooms;
	}

	public String toString() {
		String toStr = "Course    |# Constra.|Rooms\n";
		toStr += String.format("%-10s|", course);
		toStr += String.format("%-10s|", rooms.size());
		for(Iterator<String> itr = rooms.iterator();itr.hasNext();) {
			toStr += itr.next() + " ";
		}
		return toStr + "\n";
	}
	
	public List<String> getForbiddenRooms() {
		return this.rooms;
	}
	
	public String getCourseID() {
		return this.course;
	}
	
}
